package com.bestcem.xm.survey.util;

import lombok.AccessLevel;
import lombok.NoArgsConstructor;

/**
 * 各表中列名常量表
 *
 * @author XiaoYunSong <ys.xiao@idiaoyan.com>
 * @version v1.0
 * @date 2021/8/11 15:24
 */
public interface ColumnConstant {
    @NoArgsConstructor(access = AccessLevel.PRIVATE)
    class Base {
        public static final String ID = "_id";
        public static final String RECORD_FLAG = "record_flag";
        public static final String CREATED_DT = "created_dt";
        public static final String CREATED_ID = "created_id";
        public static final String UPDATED_DT = "updated_dt";
        public static final String UPDATED_ID = "updated_id";
    }

    @NoArgsConstructor(access = AccessLevel.PRIVATE)
    class TicketRule extends Base {
        public static final String SURVEY_ID = "surveyId";
        public static final String TICKET_CONFIG_ID = "ticketConfigId";
        public static final String TITLE = "title";
        public static final String GID = "gid";
        public static final String OPERATION = "operation";
        public static final String CREATOR = "creator";
        public static final String VERSION = "version";
        public static final String RULE_TYPE = "rtype";
        public static final String CONDITION = "condition";
        public static final String TARGET_LIST = "targetList";
        public static final String CONDITION_LIST = "conditionlist";
        public static final String SAMPLE = "sample";

        @NoArgsConstructor(access = AccessLevel.PRIVATE)
        public static class Condition {
            public static final String LOGIC = "logic";
            public static final String FILTERS = "filters";
            public static final String RTYPE = "rtype";
            public static final String RULE = "rule";

            @NoArgsConstructor(access = AccessLevel.PRIVATE)
            public static class Filter {
                public static final String OPERATION = "operation";
                public static final String CATEGORY = "category";
                public static final String VALUE = "value";
                public static final String SOURCEQ = "sourceQ";
                public static final String LOGIC = "logic";
                public static final String ID = "id";

                @NoArgsConstructor(access = AccessLevel.PRIVATE)
                public static class Options {
                    public static final String GID = "gid";
                    public static final String TITLE = "title";
                    public static final String TYPE = "type";
                    public static final String SEQ = "seq";
                    public static final String OID = "oid";
                    public static final String DISABLED = "disabled";
                    public static final String IS_OPEN = "is_open";
                    public static final String OPEN_ATTRS = "open_attrs";
                }

                @NoArgsConstructor(access = AccessLevel.PRIVATE)
                public static class SourceQ {
                    public static final String ID = "id";
                    public static final String TYPE = "type";
                    public static final String GID = "gid";
                    public static final String CID = "cid";
                    public static final String ALIGN = "align";
                    public static final String OPTIONS_RANDOM = "options_random";
                    public static final String REQUIRED = "required";
                    public static final String TITLE = "title";
                    public static final String QTYPE = "qtype";
                    public static final String CUSTOM_QTYPE = "custom_qtype";
                    public static final String COLUMN_VALUE = "column_value";
                    public static final String VOTE_SETTING = "vote_setting";
                    public static final String ANSWER_STYLE = "answerStyle";
                    public static final String DISP_CODE = "disp_code";
                    public static final String FIXED = "fixed";
                    public static final String ITEMS = "items";
                    public static final String CODE_SELECT = "codeSelect";
                    public static final String JUMP_CODE = "jump_code";
                    public static final String SCORE_RANGE = "score_range";
                    public static final String ICON = "icon";
                    public static final String PROMPT_TEXT = "prompt_text";
                    public static final String OPTION_BIND_LIST = "option_bind_list";
                    public static final String OPTIONS_BIND_EFFECT = "optionsBindEffect";
                    public static final String OPTION_GROUP_LIST = "option_group_list";
                    public static final String OPTIONS_GROUP_EFFECT = "optionsGroupEffect";
                    public static final String INDEX = "_index";
                    public static final String OPTIONS_GROUP_RANDOM = "options_group_random";
                    public static final String GROUP_ALIGN = "group_align";
                    public static final String SEQ = "seq";
                    public static final String DEFAULT_Q_TIMECOST = "default_q_timecost";
                    public static final String OPTIONS = "options";

                    @NoArgsConstructor(access = AccessLevel.PRIVATE)
                    public static class Item {
                        public static final String TYPE = "type";
                        public static final String GID = "gid";
                        public static final String TITLE = "title";
                        public static final String SEQ = "seq";
                        public static final String OID = "oid";
                        public static final String IS_OPEN = "is_open";
                        public static final String DISP_CODE = "disp_code";
                        public static final String PLASTER_CODE = "plaster_code";
                        public static final String OPEN_ATTRS = "open_attrs";

                        @NoArgsConstructor(access = AccessLevel.PRIVATE)
                        public static class OpenAttrs {
                            public static final String REQUIRED = "required";
                            public static final String TYPE = "type";
                            public static final String RANGE = "range";
                            public static final String UNIQUE = "unique";
                            public static final String UNIT = "unit";
                        }
                    }

                    @NoArgsConstructor(access = AccessLevel.PRIVATE)
                    public static class PromptText {
                        public static final String LEFT_WORDS = "left_words";
                        public static final String MIDDLE_WORDS = "middle_words";
                        public static final String RIGHT_WORDS = "right_words";
                    }
                }

                @NoArgsConstructor(access = AccessLevel.PRIVATE)
                public static class Value {
                    public static final String NAIRE_OPTIONS = "naireOptions";
                    public static final String OPTION_LIST = "optionList";
                    public static final String EVALUATION_TYPE = "evaluationType";
                    public static final String OPTION_MATCH = "optionMatch";
                    public static final String WORD_LIST = "wordList";
                    public static final String EXCLUDE_LIST = "excludeList";
                    public static final String CLASSIFY = "classify";
                    public static final String IS_OPEN = "isOpen";
                    public static final String EXPIRE = "expire";
                    public static final String SORT = "sort";
                    public static final String TIME = "time";
                    public static final String MIN_SCORE = "minScore";
                    public static final String MAX_SCORE = "maxScore";
                    public static final String DAYS = "days";
                    public static final String LEFT_OPEN = "leftOpen";
                    public static final String RIGHT_OPEN = "rightOpen";
                    public static final String DATE = "date";


                    @NoArgsConstructor(access = AccessLevel.PRIVATE)
                    public static class NaireOptions {
                        public static final String OPTIONS = "options";
                        public static final String TYPE = "type";
                        public static final String _ID = "_id";
                        public static final String GID = "gid";
                        public static final String OID = "oid";
                        public static final String TITLE = "title";
                        public static final String OPEN_ATTRS = "open_attrs";
                        public static final String IS_OPEN = "is_open";
                        public static final String SEQ = "seq";
                    }
                }
            }
        }
    }
}
